package com.googlecode.horncomb.web.extremetable.util;

import javax.servlet.http.HttpServletRequest;

import org.springframework.util.ClassUtils;
import org.springframework.validation.BindException;

import com.googlecode.horncomb.bean.paged.PagedSettingContainer;
import com.googlecode.horncomb.web.spring.mvc.OnBindingAction;

public class OnBindingBuildExTabInfoAction implements OnBindingAction {
	public void doOnBind(HttpServletRequest request,
			Object command, BindException errors) throws Exception {
		if (ClassUtils.isAssignableValue(PagedSettingContainer.class,
				command)) {
			((PagedSettingContainer) command)
					.setPagedSettingMap(ExtremeTableUtil
							.getPagedSettingMap(request));
		}
	}
}
